﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using SmallERP.MODEL.FoundationModel;

namespace SmallERP.MODEL.PBModel
{
    //public delegate void BarCodeStatusChanged(SmallERP.COM.Status.PhotoBarCodeStatus curStatus);

    public class PhotoInfo_PB
    {
        //public event BarCodeStatusChanged BarCodeStatusChangedEvent;
        public PhotoInfo_PB()
        {
            PBNum = 0;
            Photo_Base_Info = new Photo_Info();
        }
        public Photo_Info Photo_Base_Info { get; set; }

        //public float Height_CM { get; }


        //public float Width_CM { get; }

        public int OrderProductId
        {
            get
            {
                return Photo_Base_Info.OrderProductId;
            }
        }



        /// <summary>
        /// 图片的条码信息0-条码在图片的左边或是右边，1-条码在图片的上面或是下面，2-无条码
        /// </summary>
        /// 
        private SmallERP.COM.Status.PhotoBarCodeStatus _barCodeStatus;
        public SmallERP.COM.Status.PhotoBarCodeStatus BarCodeStatus
        {
            get { return _barCodeStatus; }
            set
            {
                _barCodeStatus = value; 
            }
        }

        public int PhotoNum { get { return Photo_Base_Info.TotalNum; } }
        public string PhotoName { get { return Photo_Base_Info.PhotoName; } }
        public string PicPath { get { return Photo_Base_Info.PicPath; } }
        public int TotalNum { get { return Photo_Base_Info.TotalNum; } }
        public int PBNum { get; set; }
        public int PhotoId { get { return Photo_Base_Info.PhotoId; } }
        /// <summary>
        /// 是否已自动拼板过
        /// </summary>
        public bool IsAutoPB { get; set; }

        public Point Location { get; set; }
        /// <summary>
        /// 是否旋转
        /// </summary>
        public bool IsWhirl { get; set; }
        /// <summary>
        /// 是否被托到大板上
        /// </summary>
        public bool IsInBoard { get; set; }

        /// <summary>
        /// 纸面
        /// </summary>
        public string PaperFaceName { get; set; }
        /// <summary>
        /// 纸型
        /// </summary>
        public string PaperTypeName { get; set; }
        /// <summary>
        /// 产品定单名称
        /// </summary>
        public string OrderName { get; set; }
        /// <summary>
        /// 照片尺寸 23x34(in)(XX)(CM)
        /// </summary>
        public string PhotoSize
        {
            get
            {
                return Photo_Base_Info.Width.ToString() + "X" +
                Photo_Base_Info.Height.ToString();
            }

        }

        /// <summary>
        /// 照片所对应的产品的加急级别
        /// </summary>
        public int Priority { get; set; }

        public Size PSize { get { return new Size(Photo_Base_Info.PixWidth, Photo_Base_Info.PixHeight); } }


    }
}
